<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo __('MILU ECommerce '); ?>
		<?php echo $title_for_layout; ?>
	</title>
	<?php echo $this->Html->script('jquery-1.8.3'); ?>
	<?php echo $this->Html->script('jquery.validate.min'); ?>
	<?php echo $this->Html->script('jquery.simplemodal'); ?>
	<?php echo $this->Html->script('backend'); ?>
	<?php
		echo $this->Html->meta('icon');

		echo $this->Html->css('backend');

		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
</head>
<body>
	<div id='wapper'>
		<header> 
			<div class='bwrapper-content'>
				<span class='bh-text'>Administrator</span>
				<?php if($this->Session->check('Auth.User')): ?>
				<ul id="tcontrol" class="btn_view_site">
					<li><?php echo $this->Html->link(__('Website'), '/', array('class' => 'ict-link website', 'target' => 'blank')) ?></li>
					<li style="position:relative;">
						<a href="#" class="ict-link task <?php echo (isset($countJobs) && $countJobs > 0) ? 'has_task' : ''?>"> <?php echo __('Tasks') ?></a>
						<?php if(isset($countJobs) && $countJobs > 0){ ?>
						<span class="notify"><?php echo $countJobs ?></span>
						<ul class="sub-topmn jobs_list" >
							<li class="topli-notify"></li>
							<?php if(isset($countContacts)){ ?>
								<li><a href="#"><?php echo $countContacts ?> <?php echo __('Contacts') ?></a></li>
							<?php } ?>
							<?php if(isset($countPostComments)){ ?>
								<li><a href="#"><?php echo $countPostComments ?> <?php echo __('Comments') ?></a></li>
							<?php } ?>
						</ul>
						<?php } ?>
					</li>
					<li>
						<?php echo $this->Html->link(__('Logout'), array("controller" => 'Users', "action" => 'logout', 'admin' => true), array('class' => 'ict-link logout'))?>
					</li>
				</ul>
				<?php endif; ?> 
			</div>
		</header> <!-- end header -->
		<div id='bmenu'>
			<div class='bwrapper-content'>
			<?php if($this->Session->check('Auth.User')): ?>
				<?php echo $this->fetch('admin_menu'); ?>
			<?php endif; ?>
			</div>
		</div> <!-- end #bmenu -->
		<div id='bcontent' class='bwrapper-content'>
			<?php #echo $this->Session->flash(); ?>
			<?php echo $this->fetch('content'); ?>
		</div> <!-- end #wrapper-content -->
	</div>
	<div id='footer'>
			<div class='bwrapper-content'>
				<?php echo __('©2013 Cakeecom - Ecommerce Solutions. All rights reserved. Admin Build Information') ?>
			</div>
	</div>
        <!-- ajax loader -->
        <div id="ajax-mask"></div>
        <div id="ajax-loader"><?php echo $this->Html->image('ajax-loader2.gif') ?></br><?php echo __('Processing ...') ?></div>
        <!-- end ajax loader -->
	<?php echo $this->element('sql_dump'); ?>
	<?php echo $this->Js->writeBuffer(); // Write cached scripts ?>
</body>
</html>
